Quantifying and Preventing Side Channels with Substructural Type Systems

نویسندگان

  • Van Chan Ngo
  • Mario Dehesa-Azuara
  • Matthew Fredrikson
  • Jan Hoffmann
چکیده

Static techniques for deriving upper bounds on the resource consumption of programs have been extensively studied. However, there are applications that require more fine-grained information such as the difference between upper and lower bounds or the guaranty that the resource usage of a program does not differ for certain inputs. This article presents two novel substructural type systems for deriving lower bounds and for proving that a program has constant resource consumption for a class of inputs. The type systems are based on the potential method of amortized analysis to achieve compositionality, precision, and automatic inference using off-the-shelf linear optimization. While classic amortized analysis treats potential as an affine resource, the novel type systems treat potential as a relevant and linear resource, respectively. The soundness of the type systems with respect to an operational cost semantics is verified using the proof assistant Agda. The novel constant-resource and lower bound analyses are applied to quantify and prevent security vulnerabilities that leak secret information through resource consumption, such as side channels. First, implementations of the lower bound and constant-resource type systems in Resource Aware ML are used to automatically verify constant-time implementations of list comparison, encryption and decryption routines, database queries, and other resource-sensitive functionality. Second, the type systems are used to implement a method for automatically turning programs into constant-resource programs using LP solving. The method is static, does not require tracking resources at runtime, and works on most programs for which Resource Aware ML can derive an upper bound. Third, a resource-aware noninterference property is introduced. It relaxes the constant-resource requirement on programs, and requires only that resource usage does not leak information about secret inputs. This property is statically verified by combining the linear type system for constant resource consumption with an information flow type system.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Substructural Epistemic Resource Logic and Its Use in Systems Security Modelling

We present a substructural epistemic logic, based on Boolean BI, in which the epistemic modalities are parametrized on the agent’s local resource. The new modalities can be seen as generalizations of the usual epistemic modalities. The logic combines Boolean BI’s resource semantics with epistemic agency. We give a labelled tableaux calculus and establish soundness and completeness with respect ...

متن کامل

Type-Based Analysis for Session Inference (Extended Abstract)

We propose a type-based analysis to infer the session protocols of channels in an ML-like concurrent functional language. Combining and extending well-known techniques, we develop a type-checking system that separates the underlying ML type system from the typing of sessions. Without using linearity, our system guarantees communication safety and partial lock freedom. It also supports provably ...

متن کامل

Linear types for higher order processes with first class directed channels

We present a small programming language for distributed systems based on message passing processes. In contrast to similar languages, channels are one-to-one connections between a unique sender and a unique receiver process. Process dee-nitions and channels are rst class values and the topology of process systems can change dynamically. The operational semantics of the language is deened by mea...

متن کامل

A Substructural Epistemic Resource Logic ( Extended Version ) 17 October , 2016 Didier Galmiche Pierre Kimmel

We present a substructural epistemic logic, based on Boolean BI, in which the epistemic modalities are parametrized on agents’ local resources. The new modalities can be seen as generalizations of the usual epistemic modalities. The logic combines Boolean BI’s resource semantics with epistemic agency. We give a labelled tableaux calculus and establish soundness and completeness with respect to ...

متن کامل

Practical Programming with Substructural Types

Substructural logics remove from classical logic rules for reordering, duplication, or dropping of assumptions. Because propositions in such a logic may no longer be freely copied or ignored, this suggests understanding propositions in substructural logics as representing resources rather than truth. For the programming language designer, substructural logics thus provide a framework for consid...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016